import React, { PureComponent } from 'react';
import { Card, WingBlank, WhiteSpace, Accordion, List } from 'antd-mobile';
import { connect } from 'dva';
import ast from './index.less';
import md5 from 'md5';
import { createForm, formShape } from 'rc-form';
import { Divider } from 'antd';
const PlaceHolder = ({ className = '', ...restProps }) => (
  <div className={`${className} placeholder`} {...restProps}>Block</div>
);

class Culture extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  componentWillMount() {
    this.props.dispatch({ type: "diplomaCertificationModule/loadInfoPersonInfoByCurrInfo" })
  }
  // 
  render() {
    let dic = {}
    if (this.props.list.data2 != undefined) {
      this.props.list.data2.map(s => {
        dic[s.code] = s.name
      })
    }
    const Item = List.Item;
    return (
      <div>
        {this.props.list == '' ? null :
          <List renderHeader={() => '学历信息确认'} className="my-list">
            <Item extra={'身份证号'}>{this.props.list.data.data.cardNum}</Item>
            <Item extra={'学号'}>{this.props.list.data4.data.perNum}</Item>
            <Item extra={'学校名称'}>{this.props.list.data5.data.value}</Item>
            <Item extra={'学校代码'}>{this.props.list.data1.data.value}</Item>
            <Item extra={'学历层次'}>{this.props.list.data.data.levelCode}</Item>
            <Item extra={'学制'}>{this.props.list.data.data.classYear}</Item>
            <Item extra={'入学年月'}>{this.props.list.data.data.entrYearMon}</Item>
            <Item extra={'民族'}>{dic[this.props.list.data.data.peopleCode]}</Item>
            <Item extra={'毕业年月'}>{this.props.list.data3 == undefined || this.props.list.data3.graduateDate == undefined ? '暂无' : this.props.list.data3.data.graduateDate.split(" ")[0]}</Item>
          </List>
        }
      </div>
    );
  }
}
function mapStateToProps(state) {
  return {
    list: state.diplomaCertificationModule.list
  }
}
export default connect(mapStateToProps)(Culture);
